package com.kaifamiao.inherit;

public class Beast extends Animal {

    private String name;

    public Beast(String name) {
        super("兽");
        System.out.println( "Beast(String)");
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static void main(String[] args) {
        Beast b = new Beast( "熊二" );
        System.out.println( b.getType() );
        System.out.println( b.getName() );
        b.setType( "兽类" );
        System.out.println( b.getType() );
    }
}
